package com.ruoyi.core.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.model.LoginBody;
import com.ruoyi.core.service.JsPluginService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author xiaom
 * @Date 2020/11/6 15:12
 * @Version 1.0.0
 * @Description <>
 **/
@RestController
@Validated
@Api(tags = "js插件路由")
public class PluginController {

    @Autowired
    private JsPluginService jsPluginService;

    @PostMapping(value = "/jsPlugin/login")
    public AjaxResult login(@RequestBody LoginBody loginBody){
        return AjaxResult.success(jsPluginService.login(loginBody));
    }

}
